package com.five.zhh.fiveinfive.room.user;

import lombok.Data;

/**
 * 玩家在房间里的信息
 */
@Data
public class UserInfoInRoom extends UserInfo {

    /**
     * 角色，1：黑子，2：白子，3：观众
     */
    private int role;

    /**
     * 是否先手
     */
    private boolean isFirst;

    public UserInfoInRoom(UserInfo userInfo, int role) {
        this.setUserId(userInfo.getUserId());
        this.setUserName(userInfo.getUserName());
        this.setRole(role);
    }

    public UserInfoInRoom(UserInfo userInfo, int role, boolean isFirst) {
        this.setUserId(userInfo.getUserId());
        this.setUserName(userInfo.getUserName());
        this.setRole(role);
        this.setFirst(isFirst);
    }

}
